import { materialFields, materialRenderers } from '@jsonforms/material-renderers';

import Rating, { RatingTester } from '../components/Rating';
import SelectionField, { SelectionFieldTester } from '../components/Selection';
import AccordionLayout, { AccordionLayoutTester } from '../components/Accordion';

export default {
  jsonforms: {
    core: {
      data: require('../schema-data.json'),
      schema: require('../schema.json'),
      uischema: require('../schema-ui.json'),
    },
    fields: [...materialFields, {
      tester: SelectionFieldTester,
      field: SelectionField,
    }],
    renderers: [...materialRenderers, {
      tester: RatingTester,
      renderer: Rating,
    }, {
      tester: AccordionLayoutTester,
      renderer: AccordionLayout,
    }],
  },
};
